import axios, { AxiosRequestConfig } from 'axios'
const baseURL = 'http://localhost:9600/'

const config = {
    // baseURL
} as AxiosRequestConfig

const _instance = axios.create(config)

_instance.interceptors.request.use(
    (config) => {
        console.log(config)
        // 请求拦截
        return config
    },
    (err) => { Promise.reject(err) })


_instance.interceptors.response.use(
    // 响应拦截
    (config) => {
        return config
    }, (err) => {
        return Promise.reject(err)
    })

export default _instance
